
<div class="easyui-layout" style="width:100%;height:1000px;">
	<div region="north" style="overflow:hidden;height:70px;padding-left:25px;">
		<table align="left">
			<tr>
				<td>
					<img src="<?= base_url()?>assets/default/images/user/user-profile.png"/>
				</td>
				<td valign="middle">
					<h1>View profile</h1>
				</td>
			</tr>
		</table>
	</div>
	<div region="south" split="true" style="height:50px;background:#fafafa;">
	</div>
	<div region="east" icon="icon-reload" title="Notifications" split="true" style="width:250px;">
	</div>
	<div region="west" split="true" title="Navigation" style="width:200px;">
		<?= $navigation?>
	</div>
	<div region="center" title="User Profile" style="background:#fafafa;padding:10px;">
		
		
<div id="win" class="easyui-panel" title="Personal Information" style="padding:10px;">

        <table>
          <tr>
            <td width="150" valign="top" align="center">
				&nbsp; <br />
				<a href="<?= site_url("login/logout")?>">Logout</a>
			</td>
            <td><table width="100%" cellspacing="0" cellpadding="3" border="0">
                <tbody>
                  <tr>
                    <td>firstName</td>
                    <td>&nbsp; <?= $userData["firstname"]?></td>
                  </tr>
                  <tr>
                    <td>lastName</td>
                    <td>&nbsp; <?= $userData["lastname"]?></td>
                  </tr>
                  <tr>
                    <td>email</td>
                    <td>&nbsp; <?= $userData["email"]?></td>
                  </tr>
                </tbody>
              </table></td>
          </tr>
        </table>
</div>		
<br/>
<?php foreach ($associationsData as $association){ ?>

<?php if($association["is_admin"]){?>
<script type="text/javascript">
	$(function(){
		$('#association-panel-<?= $association["id"]?>').panel({
			tools:[{
				iconCls:'icon-edit',
				handler: function(){
					window.location = "<?= site_url("user/edit_association")."/".$association["id"]?>";
				}
			},{
				iconCls:'icon-remove',
				handler: function(){
					window.location = "<?= site_url("user/remove_association")."/".$association["id"]?>";
				}
			}]
		});
	});
</script>
<?php }?>


	<div id="association-panel-<?= $association["id"]?>" title="Association: <?= $association["raison_social"]?>" class="easyui-panel"  style="padding:10px;">
	
		<table width="100%" cellspacing="0" cellpadding="3" border="0">
	        <tbody>
	          <tr>
	            <td>Raison Social: </td>
	            <td>&nbsp; <?= $association["raison_social"]?></td>
	          </tr>
	          <tr>
	            <td>Email: </td>
	            <td>&nbsp; <?= $association["mail"]?></td>
	          </tr>
	          <tr>
	            <td>Fondateur: </td>
	            <td>&nbsp; <?= $association["fondateur"]?></td>
	          </tr>
	          <tr>
	            <td>Date: </td>
	            <td>&nbsp; <?= $association["date_fondation"]?></td>
	          </tr>
	          <tr>
	            <td>Contact: </td>
	            <td>&nbsp; <?= $association["contact"]?></td>
	          </tr>
	          <tr>
	            <td>Telephone: </td>
	            <td>&nbsp; <?= $association["telephone"]?></td>
	          </tr>
	          <tr>
	            <td>Address: </td>
	            <td>&nbsp; <?= $association["adresse"]?></td>
	          </tr>
	          <tr>
	            <td>Description: </td>
	            <td>&nbsp; <?= $association["description"]?></td>
	          </tr>
	        </tbody>
		</table>
	</div>		
	<br/>	
<?php } ?>
		
	</div>
</div>






